package com.gm.wj.entity;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import lombok.ToString;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.Where;

import javax.persistence.*;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * @program: wj
 * @description: 课程
 * @author: Huang_shengjun
 * @create: 2020-08-27 21:28
 **/
@Data
@Entity
@Table(name = "sys_message")
@ToString
@JsonIgnoreProperties({ "handler","hibernateLazyInitializer" })
public class SysMessage {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private int id;

    /**
     * 接收用户
     */
    private String receiveUsername;

    /**
     * 接收人账号
     */
    @NotEmpty(message = "账号不能为空")
    private String receiveNum;

    /**
     * 主题
     */
    private String subject;

    @NotEmpty(message = "内容不能为空")
    private String content;

    /**
     * 操作人
     */
    private String sendUsername;

    /**
     * 附件
     */
    private String filename;

    /**
     * 创建时间
     */
    private String createTime;

    /**
     * 0-发送失败，1-成功
     */
    private int isSuccess;

    /**
     * 0-邮箱；1-短信
     */
    @NotNull(message = "请选择发送类型")
    private int sendType;
}
